package String类;

import java.util.Random;
     //生成伪装随机数
public class RandomDemo {
      public static void main(String[] args) {
		Random r1=new Random(10);
		System.out.println(r1.nextBoolean());
		System.out.println(r1.nextInt());
		System.out.println(r1.nextDouble());
		
		System.out.println("-----------------分割线---------------");
		
		Random r2=new Random(10);
		System.out.println(r2.nextBoolean());
		System.out.println(r2.nextInt());
		System.out.println(r2.nextDouble());
		System.out.println("-----------------分割线---------------");
		//生成34-179之间的随机数：34+【0,145)
		  int num=new Random().nextInt(145)+34;
		  System.out.println(num);
	}
}
